|
Oracle® Rules Palette Release 9.1.0.0.0 E15811-01 |
ActionEvents provide the ability to perform actions on a field when an event occurs on the screen. Configuration is done by establishing user events and linking them to action sets via ID attributes. When the user selects something in OIPA an event invokes a set of action sets, which change fields or display messages.
The various types of ActionEvents you can configure are:
You can create custom error and warning messages that appear to the end user after the system validates what was entered.
You can change fields from enabled to disabled (and vice versa) when an event occurs.
You can change fields from hidden to displayed (and vice versa) when an event occurs.
You can change a field’s data according to the value in a trigger field.
|
Element/Tag |
Definition |
Attributes |
Element/Attribute Value and Description |
|
<Events> |
The opening and closing tag for the element. |
|
|
|
<Event> |
Determines when the event should be run. |
TYPE |
ONLOAD ONCHANGE ONSUBMT |
|
FIELD |
Any field name in the <Fields> section. Used with ONCHANGE to identify the trigger field, which when it changes, causes the actions to process. | ||
|
<Math> |
Call the <Math> that is defined in the <ScreenMath> section to be run whose name matches an ID. |
ID |
Any ID name given in the Math section under <ScreenMath>. |
|
<ActionSet> |
Call the <ActionSet> that is defined in the <Actions> section to be run whose name matches an ID. |
ID |
Any ID name given in the <Actions> section under <ActionSet>. |
|
<QuerySet> |
Call the <QuerySet> that is defined in the <Actions> section to be run whose name matches an ID. |
ID |
Any ID name given in the <Actions> under <QuerySet>. |
|
FIELD |
The field name that will be changed, when the trigger field’s value changes. | ||
|
<ScreenMath> |
|
|
|
|
<Math> |
Existing Math with the added identification section through the use of ID |
ID
|
Any name (no spaces). |
|
GLOBAL
|
Yes / No
| ||
|
<MathVariables> |
Existing standard math capabilities. |
|
|
|
<Actions> |
|
|
|
|
<QuerySet> |
Defines QuerySet. |
ID |
Any name (no spaces). |
|
<Condition> |
Optional conditional logic. |
IF |
Any conditional statement. |
|
VALUE |
Any conditional statement. | ||
|
<Action> |
Defines whether to fill combo box with SQL or fix options. |
ACTIONTYPE
|
SQLQUERY |
|
OPTIONS | |||
|
<Option> |
Standard definition for fixed options for a combo box field. |
|
|
|
<OptionValue> |
Standard definition. |
|
|
|
<OptionText> |
Standard definition. |
|
|
|
<ElseIf> |
ElseIf is used when the IF condition has not been met. ElseIf can only be used nested within a <Condition>.
Multiple ElseIf conditions are possible. |
VALUE |
Any single value.
Screen and field math variables are available for use.
CHECKED UNCHECKED are also available. |
|
IF |
Any expression.
Functions and direct date comparisons are available for use.
Global and local math is available for use. | ||
|
<Else> |
Else is used when the <Condition> and any ElseIf conditions have not been met. Else must be nested within a <Condition> or <ElseIf> statement.
Else cannot use a conditional statement as it represents everything else. |
|
|
|
<ActionSet> |
Defines ActionSet |
ID |
Any name (no spaces). |
|
<Condition> |
Optional conditional logic.
|
IF |
Any expression. Expression is performed.
If result is true, then actions following will be performed. Functions and direct date comparisons are available for use.
Screen and field math variables are available for use. |
|
VALUE |
Any single value. Compare to a single value.
If it matches, then actions following will be performed. Screen and field math variables are available for use.
CHECKED, UNCHECKED are also available. | ||
|
<Action> |
Defines the type of action that is to occur. |
FIELD |
The field name where the action is to occur. This attribute is required when action type is equal to assign. It is also available when action type is equal to error or warning. |
|
ACTIONTYPE |
ERROR Provides a message to the user. The user cannot proceed until the all errors are fixed. All will occur in one section of the screen (if more than one occurs). By hitting OK on the errors, the user will be taken back to the screen to fix the errors.
When FIELD is used, the error will appear under the field name as well as in the Validation section at the top of the screen. | ||
|
WARNING Provides a warning message to the user. This is a warning to the user and the user may proceed even with the error messages. All will occur in one section of the screen (if more than one occurs). By hitting OK on the warnings, the user can proceed.
When FIELD is used, the warning will appear under the field name as well as in the Validation section at the top of the screen. | |||
|
SHOW Will make hidden field visible. | |||
|
HIDE Will hide a visible field.
| |||
|
ENABLE Allows the ability to enter a field value.
| |||
|
DISABLE Does not allow the ability to enter a field value and changes background color.
| |||
|
READONLY Disables the ability to enter a field value but does not change background color.
| |||
|
ASSIGN Allows a value to be set based on the change of a different field.
ASSIGN does not automatically process the OnChange or OnLoad of the field that it is setting.
| |||
|
<ElseIf> |
ElseIf is used given that the IF condition has not been met. ElseIf can only be used when an IF condition is also used.
Multiple ElseIf conditions are possible. |
VALUE |
Any single value.
Screen and Field math variables are available for use.
CHECKED, UNCHECKED are also available. |
|
Expression is performed. If result is true, then actions following will be performed.
|
IF |
Any expression.
Functions and direct date comparisons are available for use.
Screen and field math variables are available for use. | |
|
<Action> |
Defines the type of action that is to occur. |
|
|
|
<Else> |
Else is used when the IF and any ElseIf conditions have not been met. Else can only be used when an IF condition is also used.
Else cannot use a conditional as it represents everything else. |
|
|
|
<Action> |
Same as above under IF. |
|
|
<Events>
<Event TYPE="ONLOAD">
<QuerySet ID="OnLoadQualType" FIELD="FundingMethod"></QuerySet>
</Event>
<Event TYPE="ONCHANGE" FIELD="FundingMethod">
<ActionSet ID="OnChangeFundingMethod"></ActionSet>
</Event>
<Event TYPE="ONSUBMIT">
<ActionSet ID="FinalValidation"></ActionSet>
</Event>
</Events>
<ScreenMath>
<Math ID="GlobalScreenMath" GLOBAL="Yes">
<MathVariables>
<MathVariable VARIABLENAME="NA" TYPE="VALUE" DATATYPE="TEXT">00</MathVariable>
<MathVariable VARIABLENAME="NonQualified" TYPE="VALUE" DATATYPE="TEXT">13</MathVariable>
<MathVariable VARIABLENAME="Replacement" TYPE="VALUE" DATATYPE="TEXT">98</MathVariable>
</MathVariables>
</Math>
</ScreenMath>
<Actions>
<QuerySet ID="OnLoadQualType">
<Condition IF="QualType=GlobalScreenMath:NonQualified">
<Action ACTIONTYPE="SQLQUERY">SELECT AsCode.CodeValue, AsCode.ShortDescription FROM AsCode WHERE AsCode.CodeName = 'AsCodeMoneyType' AND AsCode.CodeValue IN ('00','01','50') ORDER BY AsCode.CodeValue</Action>
<Else>
<Action ACTIONTYPE="SQLQUERY">SELECT AsCode.CodeValue, AsCode.ShortDescription FROM AsCode WHERE AsCode.CodeName = 'AsCodeMoneyType' AND AsCode.CodeValue IN ('00','01','98') ORDER BY AsCode.CodeValue</Action>
</Else>
</Condition>
</QuerySet>
<ActionSet ID="OnChangeFundingMethod">
<Condition IF="FundingMethod=GlobalScreenMath:Replacement">
<Action ACTIONTYPE="ENABLE" FIELD="ReplacementType"></Action>
<Else>
<Action ACTIONTYPE="DISABLE" FIELD="ReplacementType"></Action>
<Action ACTIONTYPE="ASSIGN" FIELD="ReplacementType">GlobalScreenMath:NA</Action>
</Else>
</Condition>
</ActionSet>
<ActionSet ID="FinalValidation">
<Condition IF="IsEmpty(GrossAmount)">
<Action ACTIONTYPE="ERROR">Gross Amount is a required field.</Action>
<ElseIf IF="GrossAmount <= 0">
<Action ACTIONTYPE="ERROR">Gross Amount must be greater than $0.00.</Action>
</ElseIf>
</Condition>
<Condition IF="IsEmpty(EffectiveDate)">
<Action ACTIONTYPE="ERROR">Effective Date is a required field.</Action>
<ElseIf IF="EffectiveDate > SystemDate">
<Action ACTIONTYPE="ERROR">Effective Date cannot be in the future.</Action>
</ElseIf>
</Condition>
<Condition IF="ReplacementType=GlobalScreenMath:NA And FundingMethod=GlobalScreenMath:Replacement">
<Action ACTIONTYPE="ERROR">A Replacement Type must be chosen.</Action>
</Condition>
</ActionSet>
</Actions>
(Example XML Pseudo Code)
<Transaction>
<!-- Configured fields -->
<Fields>
</Fields>
<!-- Events to invoke -->
<Events>
<Event TYPE="ONCHANGE" FIELD="EffectiveDate">
<Math ID ="Math100"/>
<QuerySet ID="Query100 FIELD=”MailCode"/>
<ActionSet ID="Action101"/>
</Event>
</Events>
<!-- Math that can be used for an Event -->
<ScreenMath>
<Math ID=”ScreenMath” GLOBAL=”Yes”> <!-- Identifying Global Math -->
<MathVariables>
<MathVariable VARIABLENAME="ExampleValue" TYPE="SQL" DATATYPE="TEXT"> SELECT AsActivityField>&ldots;</MathVariable>
</Math>
<!-- Local Math for a specific field -->
<Math ID="Math100">
<MathVariables>
<MathVariable VARIABLENAME="XYZ">&ldots;</MathVariable>
</MathVariables>
</Math>
</ScreenMath>
<<!-- Query Sets and Action Sets that define that action to be performed -->
<Actions>
<!-- Query Sets that changes field data-->
<QuerySet ID="Query100">
<Condition IF="Field != '01'">
<Action ACTIONTYPE="SQLQUERY">SELECT CodeValue &ldots;</Action>
<Else>
<Action ACTIONTYPE="OPTIONS">
<Option>
<OptionValue>01</OptionValue>
<OptionText>Mail</OptionText>
</Option>
<Option>
<OptionValue>02</OptionValue>
<OptionText>Hold</OptionText>
</Option>
</Action>
</Else>
</Condition>
</QuerySet>
<!-- Action Sets that control fields -->
<ActionSet ID="Action101">
<Condition IF="EffectiveDate == ''">
<Action ACTIONTYPE="WARNING" FIELD=” EffectiveDate”r;>Date Missing</Action>
</Condition>
</ActionSet>
</Actions>